
/**
 * sql语句转换为查询count的sql语句  
 * @param sql 
 * @returns 
 */
export function getCountSql(sql: string): string {
    return sql.replace(/^select\s+(?:\*|[\w\s,.()]+?)\s+from\s+/i, 'SELECT COUNT(0) FROM ');
}

